How to partition a hard disk on your MM/1

Below are the partitions and the makefile used to build them. I modified hOa.a. hOb.a, and hOc.a which came with my mm/1 to build the partitions. Notice the following fields in the descriptor source files:

CtrlrID	-	SCSI device number of this disk, same for all  partitions!
PartNo	-	The partition number. MUST BE between 1 and 15  (inclusive).
Cylnders	-	The number of cylinders for this partition.
Heads	-	"arbitrary" number
SectTrk &	SectTrkO - "arbitrary" number - must be the same number
LSNOffset -		Sector offset on disk to first sector of this partition
TotalCyls -		Total # cyls of all partitions on the disk
DrvNum -		Seems to always be zero. I don't understand this field.
SectSize		I use 512 bytes/sector. You probably want to also.

So, to partition your disk,  first decide how many partitions you want and roughly how large you wish each to be. You know the total number of sectors on the disk (I assume), so choose arbitrary numbers for the number of heads and sectors/track to give an integral number of cylinders on the disk. My hard disk has 205560 512-byte sectors. I chose to divide this into 571 cylinders. 205560/571 = 360 sectors per cylinder, so I chose 8 heads and 45 sectors/track.

How youju choose to divide this up probably does not matter at all. I believe the driver always uses only LSN, and never head. or cylinder. I felt safer splitting it so that the number of heads was a small number, but it probably does not. matter.

Thus, I can allocate partitions in 180k increments. (45 * 8 * 512 bytes) I chose 350 cylinders for partition 1 (/dd. /hO, 63 meg). 150 cylinders for partition 2 (/spool. 2.7 meg), and the remaining 71 cylinders for partition 3 (/usr. 12.78 meg).

For partition 1. Cylnders = 350, LSNOffset = 0,					 TotalCyls = 571
For partition 2. Cylnders = 150, LSNOffset = 126000, TotalCyls = 571
For partition 3. Cylnders =   71, LSNOffset = 180000, TotalCyls = 571

126000 = 45 * 8 * 350
180000 = 45 * 8 * (350 + 1.50)



Calculate LSNOffset carefully; I don't believe anything ever checks to make sure partitions do not overlap! (I could be wrong. I never tried to deliberately overlap partitions.) If someone is sufficiently paranoid, one could write a program to write a specific pattern in the last sector of each partition, and then check all other partitions for that pattern. (To be run right after formatting and before writing files to the disk!)

The only different fields for the different partitions of a disk are: "nam"., PartNo, Cylnders (if you choose), and LSNOffset. All the rest should be the same. Notice that the makefile is where I specify the names of the disks. I make multiple versions of some partitions with different names. /DD and /HO are the same disk, for example.

To set up the partitions, first do a physical format on hard disk as one  device.	Then boot with (or just load) the new partitions. Now do a LOGICAL format on each partition. Now you just boot with your new bootdisk with the partitions *instead* of the non-partitioned descriptor, and you're set!

I've included no description here of the various control options. (Format disable. Multi-sector transfers)

*
* This, descriptor is used for a partitioned drive.
* Note that hO is not the same as hOa
*

									nam	H0a Device Descriptor
									use	detsfile
									use	rbfdesc.a
CtrlrID				set	0
PartNo				set	1
Fudge					set	(CtrlrID*8)+PartNo
									DiskHOxvccs
DrvNum			set	0
Cylnders		set	350
Heads				 set	8
SectTrk			set	45
SectTrkO		set	45
SectSize		set	512
Control			set	FmtDsabl+MultEnabl
LSNOffset	set	0
TotalCyls 	set 571
									ends

*
* This descriptor is used for a partitioned drive
*

								nam	HOb Device Descriptor
								use	defsfile
								use	rbfdesc.a
CtrlrID			set	0
PartNo			set	2
Fudge				set	(CtrlrID*8)+PartNo
									DiskHOxvccs
DrvNum			set	0
Cylnders		set	150
Heads					set	8
SectTrk			set	45
SectTrkO		set	45
SectSize		set	512
Control			set	FmtDsabl+MultEnabl
LSNOffset	set	126000
TotalCyls	set	571
								ends

*
* This descriptor is used for a partitioned drive.
*

								nam	HOc Device Descriptor
								use	defsfile
								use	rbfdesc.a
CtrIrID			set	0
PartNo			set	3
Fudge				set	(CtrlrID *8)+PartNo
								DiskHOxvccs
DrvNum 		set	0
CyInders 	set	71
Heads				set	8
SectTrk 		set	45
SectTrkO		set 	45
SectSize		set 512
Control			set 	FmtDsabl+MultEnabl
LSNOffset	set  180000
TotalCyls	set 	571
								ends




